<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Tube/Screen.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/Tube/Screen.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'screen_id',
                    footer: "Foots",
                    cnName: '场次列表',
                    name: 'Screen',
                    url: "/Screen/",
                    sortName: "screen_id"
                },
                extend: extend,
                editFormFields: {"tube_code":"","screen_name":"","timeContainer":"","screen_start_time":"","screen_end_time":"","screen_number":"","screen_time":"","screen_sort":"","is_halftime":"","screen_remark":""},
                editFormOptions: [[{"title":"场次名称","required":true,"field":"screen_name","colSize":4,"type":"text"},
                               {"dataKey":"ScreenStatus","data":[],"title":"场馆编码","required":true,"field":"tube_code","colSize":4,"type":"select"},
                               {"title":"起止时间","field":"timeContainer","colSize":4,"type":"is-range"},
                               {"title":"开始时间","field":"screen_start_time","type":"is-range","hidden":true},
                               {"title":"结束时间","field":"screen_end_time","type":"is-range","hidden":true}],
                              [{"title":"场地数量","field":"screen_number","colSize":4,"type":"number"},
                               {"title":"时段数量","field":"screen_time","colSize":4,"type":"number"},
                               {"title":"排序","field":"screen_sort","colSize":4,"type":"number"}],
                              [{"dataKey":"enable","data":[],"title":"是否开启半场","required":true,"field":"is_halftime","colSize":4,"type":"radio"},
                               {"title":"场次备注","field":"screen_remark","type":"textarea","colSize":8}],],
                searchFormFields: {"tube_code":"","screen_name":""},
                searchFormOptions: [[{"title":"场次名称","field":"screen_name","type":"like"},{"dataKey":"ScreenStatus","data":[],"title":"场馆编码","field":"tube_code","type":"select"}]],
                columns: [{field:'screen_id',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       //{field:'tube_name',title:'场馆名称',type:'string',width:220,align:'left',sortable:true},
                       {field:'tube_code',title:'场馆名称',type:'string',bind:{ key:'ScreenStatus',data:[]},width:150,align:'left',show:true},
                       {field:'screen_name',title:'场次名称',type:'string',width:150,align:'left',show:true},
                       {field:'screen_code',title:'场次编码',type:'string',width:150,align:'left',show:true},
                       {field:'screen_start_time',title:'开始时间',type:'string',width:80,align:'left',sortable:true},
                       {field:'screen_end_time',title:'结束时间',type:'string',width:80,align:'left',sortable:true},
                       {field:'screen_number',title:'场地数量',type:'int',width:80,align:'left'},
                       {field:'screen_time',title:'时段数量',type:'int',width:80,align:'left'},
                       {field:'screen_sort',title:'排序',type:'string',width:50,align:'left'},
                       {field:'screen_remark',title:'场次备注',type:'string',width:220,align:'left',show:true},
                       {field:'is_halftime',title:'是否开启半场',type:'int',bind:{ key:'enable',data:[]},width:110,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:100,align:'left',show:true},
                       {field:'createDate',title:'创建时间',type:'datetime',width:160,align:'left',sortable:true},
                      // {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:100,align:'left',show:true},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:160,align:'left',sortable:true},
                      // {field:'merchantName',title:'商户名称',type:'string',width:220,align:'left'},
                      // {field:'merchantCode',title:'商户编码',type:'string',width:220,align:'left'},
                      // {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'}
                       ],
                detail: {
                    cnName:"场地列表",
                    columns: [
                      // {field:'is_halftime',title:'是否半场',type:'int',width:90,align:'left'},
                      // {field:'screen_id',title:'场次编码',type:'int',width:90,align:'left'},
                       //{field:'screen_name',title:'场次名称',type:'string',width:220,align:'left'},
                        {field:'site_id',title:'site_id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                        {field:'halftime_name',title:'类别',type:'string',width:220,align:'left',sortable:true},
                        {field:'site_code',title:'场地编码',type:'string',width:220,align:'left'},
                        {field:'site_name',title:'场地名称',type:'string',width:220,align:'left',edit:true},
                        {field:'site_interl',title:'预约时间间隔',type:'string',width:220,align:'left',edit:true}],
                    sortName: "site_id",
                    key:"screen_id",
                }
            };
        }
    };
    export default vueParam;
</script>
